1. Field of the Invention
The invention relates to the field of data processing. More specifically, the invention relates to encoding.
2. Background of the Invention
In a traditional communications system, an encoder compresses a signal into a bit rate that is less than, and close to, a channel capacity. An example signal is a video signal. A video encoder compresses the video signal for transmission over a channel. A decoder receives the compressed video signal and reconstructs the video signal using all bits received from the channel. In such a model, two basic assumptions are made: 1) the encoder knows the channel capacity, and 2) the decoder is able to decode all bits received from the channel fast enough to reconstruct the video. These two basic assumptions are challenges in Internet streaming video applications.
In MPEG-2 and MPEG-4, several layered scalability techniques, namely, SNR scalability, temporal scalability, and spatial scalability, have been included. In such a layered scalable coding technique, a video sequence is coded into a base layer and an enhancement layer. The enhancement layer enhances the quality of video when received and decoded.
In MPEG-4 Fine-Granularity Scalability (FGS), the enhancement layer is encoded using bit-plane coding. An image is composed of a two-dimensional array of picture elements called pixels. Pixel values may be represented in base-2 using bits. Bits in a pixel value vary in their significance. The first bit is the 1""s place, the second is the 2""s place, the third is the 4""s place, etc. In most cases 8 bits describe pixel value so the eighth bit is 128""s place. An image or a video may be divided into a two-dimensional array represented by value bits at a particular bit position in the pixel value. The two-dimensional array is called a bit-plane because a single bit represents each pixel. The approach to compressing a bit-plane is to encode the run length of the number of zeros between each one.
In run length encoding, non-zero values are located first. The 0""s between non-zero values are then counted and the number of 0""s along with the non-zero data is encoded. In some implementations, each value is individually tested with a conditional operation. Each time a non-zero value is extracted, a mispredicted branch results because of the conditional operation. Branch misprediction decreases pipeline efficiency and slows down a processor. The slowdown of the processor becomes more pronounced as the processor""s pipeline length increases.